<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.bcinfo.upp.ac.model.RolePermission"%>
<%@ page import="java.util.*"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="ex" uri="/ex"%>

		<table>
		 <c:forEach items="${upp_login_user_menu }" var="menu0" varStatus="s">
	     <c:forEach items="${menu0.childrenMenus }" var="menu1">
	     <tr>
	     			<td colspan="100"><hr></td>
	     			</tr>
	     		<c:forEach items="${menu1.childrenMenus }" var="menu2">
	     		<c:set value="${mapres[menu2.menuId]}" var="temp"/>
			<tr>
			<td><b>${menu2.name}</b></td>
			<c:forEach var="t" items="${temp.resType.resourceActions}">
			<c:set value="0" var="isIn"/>
			<c:set value="${ex:hasPermission(res_action_map[temp.resourceId],t.bitwiseValue)}" var="hased"/>
			<c:if test="${hased}">
			<c:set value="1" var="isIn"/>
			</c:if>
			
			
			
			<c:choose>
			<c:when test="${isIn eq 1}">
			<td>
			<input name="shoseactions" type="checkbox" checked="checked" value="${temp.resourceId}_${t.bitwiseValue}" class="${temp.resourceId}_css" 
			onclick="checkAction(this,'${temp.resourceId}')" bchecked="checked" ${param.readonly} actionName="${t.actionName}"/>
			${t.actionName}
			</td>
			</c:when>
			<c:otherwise>
			<td>
			<input name="shoseactions" type="checkbox" value="${temp.resourceId}_${t.bitwiseValue}"  class="${temp.resourceId}_css"
			onclick="checkAction(this,'${temp.resourceId}')" bchecked="" ${param.readonly} actionName="${t.actionName}"/>
			${t.actionName}
			</td>
			</c:otherwise>
			</c:choose>
			</c:forEach>
			</tr>	
			</c:forEach>
	     			
	     </c:forEach>
	</c:forEach>
		
		
		
</table>